Repository navigation
Conversation
A new tier-0 crate with the abstract syntax (types, values, structured instructions, bounds_check, region loads and stores, exit) and a fuelled big-step semantics as a spec fn, transcribing the Wasm core 2.0 instructions it mirrors. Modelling choices are listed at the top of spec.rs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tc checks an instruction against the stack types, with Idx types for bounds-checked indexes and no stack-polymorphic dead code. The soundness theorem follows in the next commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tc_sound: a well-typed instruction in a conforming state is never stuck (so every load and store is inside its region), and its outcome conforms to its typing. run_sound is the corollary for a function body. Also the Wasm-coverage comparison and the gaps, as crate docs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A bounds-checked load, a countdown loop and a store-then-load, typed, rejected when they should be (no check, a short check, dead code), shown never stuck by tc_sound, and evaluated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 17, 2026 16:17 — with
GitHub Actions
Error
CI's proof job requires a mutations.json for every crate Verus checks. Three mutations of the typing (a load taking an unchecked index, Idx subtyping reversed, `br` falling through), each killed by an existing proven example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
had a problem deploying
to
full-verification
November 17, 2026 21:02 — with
GitHub Actions
Error
atiernan
had a problem deploying
to
full-verification
November 18, 2026 13:48 — with
GitHub Actions
Error
atiernan
had a problem deploying
to
full-verification
November 18, 2026 14:12 — with
GitHub Actions
Error
atiernan
temporarily deployed
to
full-verification
November 20, 2026 14:25 — with
GitHub Actions
Inactive
The branch-allows-dead-code kill certificate "did not build" in CI: typing `br` goes through top_sub and stack_sub, whose pointwise `forall` compute_only cannot evaluate. stack_sub is now defined by recursion on the last element (same meaning), and soundness::lemma_stack_sub_pointwise proves it equals the `forall` form, which the two lemmas that used that form now call. This is the pattern clazel-pkcs1 uses for `two_to` against vstd's pow2. Locally (Verus 0.2026.10.04): 36 verified, 0 errors; 3 mutations, 3 killed by a theorem with certificates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
atiernan
requested a deployment
to
full-verification
November 20, 2026 20:36 — with
GitHub Actions
Queued
This branch is being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIT plan item J.5:
clazel-lir, LIR's syntax, semantics and typing, with the typing's soundness proven. There is no back end or front end yet. The crate stays at tier 0, and its target tier is 2.This PR is part of stack #188, on top of #190. It shares nothing with that PR beyond the
Cargo.lockandPLACESlines.What's here
src/syntax.rs: LIR as jit.md describes it.block,loop,if,br,br_ifandbr_table.i32,i64andf64, plusIdx(region, size), ani64that abounds_checkhas checked.exit(code, operands).src/spec.rs: a big-step semantics with fuel. It ends inNormal,Branch,Exit,StuckorOutOfFuel.Stuck.src/typing.rs: a type checker,tc. Terminators must end their sequence, so LIR has no stack-polymorphic dead code.src/soundness.rs:tc_sound, andrun_soundfor a whole function body. A well-typed program on a state that matches its types:src/examples.rs:br.i32gives back the stored value.lib.rs), with what a front end would do about each gap.For the spec reviewer, first
These are listed in the header of
src/spec.rs.labelreduction. A branch is the outcomeBranch(l, st), which the enclosing label catches.returnis a branch to label 0, and a Wasm trap or a call to a runtime service is anExit.bounds_checkand the index mask are LIR's own, not Wasm's. The mask does nothing once the check has passed, so check that jit.md's Spectre mask isn't standing in for a real requirement.f64_add,f64_sub,f64_mul,f64_div,f64_sqrtandf64_of_int) are uninterpretedspec fns, as inclazel-js-vm. Comparisons,negandabsare exact on the bits. Checkf64_keyagainst Wasm'sfeq,fltand the other comparisons.selectis the untyped form, restricted to operands of one type.Idx(region, size)is a subtype ofi64, and ofIdxwith a smaller size.br_ifandbr_tablematch a label's types against the stack after popping the condition.Wasm gaps (recorded in the crate docs)
clz,ctz,popcnt,divandrem. The sign-extension ops can be written asshlthenshr_s.ceil,floor,trunc,nearest,min,maxandcopysign.truncandtrunc_satto integer. JS'sToInt32will need one of them.f32; narrow loads and stores; the offset and align immediates;memory.grow,memory.sizeand the bulk-memory ops;call,call_indirectandreturn_call): the biggest gap. It decides how a multi-function Wasm blob is designed.Not done
mutations.json, no independent transcription and no conformance suite.Verification
verification results:: 34 verified, 0 errors. Breaking the load typing rule makestc_soundfail, and changing the store-then-load example's expected value makes that example fail, so the proofs are not vacuous.cargo metadata --locked, rustfmt, build, clippy-D warningsandcargo xtask check(STATIC CHECKS PASSED) all pass. The rebase changed onlyCargo.lockandPLACES, so Verus was not re-run.cargo xtask verify --changedwas not run locally, because the new crate changesCargo.lock. CI's full verification is the check, and its proof jobs need approval.🤖 Generated with Claude Code